<template>
  <transition name="fade">
    <div class="backTop" @click="backTopClick">
      <img src="~assets/images/backTop/top.png" alt="">
    </div>
  </transition>
</template>

<script>
  export default {
    name: "BackTop",
    methods: {
      backTopClick(){
        this.$emit("backTopEmit");
      }
    }
  }
</script>

<style scoped>
  .backTop{
    position: fixed;
    bottom: 70px;
    right: 10px;
  }
  .backTop img{
    width: 50px;
    height: 50px;
    border-radius: 50%;
  }
  fade-enter-active, .fade-leave-active {
    transition: opacity .5s;
  }
  .fade-enter, .fade-leave-to{
    opacity: 0;
  }
</style>